// import store from '@/store'
import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/sys/login',
    method: 'post',
    data
  })
}

export function getInfo(token) {
  return request({
    url: '/vue-admin-template/user/info',
    method: 'get',
    params: { token }
  })
}

// 获取用户基本资料
export function getUserBaseInfo(token) {
  return request({
    url: '/sys/profile',
    method: 'post'
    // headers: {
    //   Authorization: 'Bearer ' + store.state.user.token
    // }
  })
}

// 获取员工基本信息
export function getEmployeeBaseInfo(id) {
  return request({
    url: `/sys/user/${id}`,
    method: 'get'
    // headers: {
    //   Authorization: 'Bearer ' + store.state.user.token
    // }
  })
}

// 获取员工列表信息
export function getEmployeeSimple() {
  return request({
    url: `/sys/user/simple`,
    method: 'get'

  })
}

